.class final Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$5;
.super Ljava/lang/Object;
.source "MeasuresDialogs.java"

# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs;->chooseEditMode(Llt/noframe/gpsfarmguide/models/MeasuringModel;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation


# instance fields
.field final synthetic val$fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

.field final synthetic val$measuringModel:Llt/noframe/gpsfarmguide/models/MeasuringModel;


# direct methods
.method constructor <init>(Llt/noframe/gpsfarmguide/analytics/FireAnalytics;Llt/noframe/gpsfarmguide/models/MeasuringModel;)V
    .locals 0

    .line 95
    iput-object p1, p0, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$5;->val$fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    iput-object p2, p0, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$5;->val$measuringModel:Llt/noframe/gpsfarmguide/models/MeasuringModel;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
    .locals 1

    const/4 p1, 0x1

    if-eqz p2, :cond_1

    if-eq p2, p1, :cond_0

    goto :goto_0

    .line 105
    :cond_0
    iget-object p1, p0, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$5;->val$fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    const-string p2, "field_info"

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendMapFieldEditDialog(Ljava/lang/String;)V

    .line 106
    new-instance p1, Landroid/content/Intent;

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p2

    const-class v0, Llt/noframe/gpsfarmguide/views/ActivitySave;

    invoke-direct {p1, p2, v0}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 107
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p2

    check-cast p2, Llt/noframe/gpsfarmguide/views/ActivityDrawer;

    const/4 v0, 0x3

    invoke-virtual {p2, p1, v0}, Landroidx/fragment/app/FragmentActivity;->startActivityForResult(Landroid/content/Intent;I)V

    goto :goto_0

    .line 99
    :cond_1
    iget-object p2, p0, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$5;->val$fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    const-string v0, "field_form"

    invoke-virtual {p2, v0}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendMapFieldEditDialog(Ljava/lang/String;)V

    .line 100
    new-instance p2, Llt/noframe/gpsfarmguide/gui/GuiFactory;

    invoke-direct {p2}, Llt/noframe/gpsfarmguide/gui/GuiFactory;-><init>()V

    iget-object v0, p0, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$5;->val$measuringModel:Llt/noframe/gpsfarmguide/models/MeasuringModel;

    invoke-virtual {p2, p1, v0}, Llt/noframe/gpsfarmguide/gui/GuiFactory;->buildGui(ILlt/noframe/gpsfarmguide/models/MeasuringModel;)V

    .line 101
    iget-object p1, p0, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$5;->val$measuringModel:Llt/noframe/gpsfarmguide/models/MeasuringModel;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/models/AbstractMeasuringModel;->setForEditing()V

    .line 102
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    iget-object p2, p0, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs$5;->val$measuringModel:Llt/noframe/gpsfarmguide/models/MeasuringModel;

    invoke-virtual {p2}, Llt/noframe/gpsfarmguide/models/MeasuringModel;->getMeasuringType()I

    move-result p2

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/Data;->setTool(I)V

    :goto_0
    return-void
.end method
